#{extends 'CRUD/layout.html' /}

<div id="crudBlank" class="${type.name}">
	
	<h2 id="crudBlankTitle">&{'crud.blank.title', type.modelName}</h2>
	
	<div class="objectForm">
	#{form action:@create(), enctype:'multipart/form-data'}
    #{crud.form fields:['pilot', 'origin', 'destination', 'stopovers', 'price', 'note']}
      #{crud.custom 'note'}
          #{field 'object.note.text'}
            <label for="note">&{'note'}</label>
            <textarea id="note" rows="5" cols="50" name="${field.name}">${object.note?.text}</textarea>
          #{/field}
        </div>
        <div class="crudField crud_unknown">
          #{field 'object.note.internal'}
            <label for="noteInternal">&{'noteInternal'}</label>
            <input id="noteInternal" type="checkbox" name="${field.name}" ${object.note?.internal ? 'checked' : ''}/>
          #{/field}
      #{/crud.custom}
    #{/crud.form}
		<p class="crudButtons">
			<input type="submit" name="_save" value="&{'crud.save', type.modelName}" />
			<input type="submit" name="_saveAndContinue" value="&{'crud.saveAndContinue', type.modelName}" />
			<input type="submit" name="_saveAndAddAnother" value="&{'crud.saveAndAddAnother', type.modelName}" />
		</p>
	#{/form}
	</div>

</div>